package com.cskaoyan.service;

import com.cskaoyan.mapper.MarketStatMapper;
import com.cskaoyan.util.TransactionUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;
import java.util.Map;

public class StatServiceImpl implements StatService {
    @Override
    public List<Map> statUser() {
        SqlSession sqlSession = TransactionUtil.getSqlSession();
        MarketStatMapper marketStatMapper=sqlSession.getMapper(MarketStatMapper.class);
        return marketStatMapper.statUser();

    }

    @Override
    public List<Map> statOrder() {
        SqlSession sqlSession = TransactionUtil.getSqlSession();
        MarketStatMapper marketStatMapper=sqlSession.getMapper(MarketStatMapper.class);
        return marketStatMapper.statOrder();

    }

    @Override
    public List<Map> statGoods() {
        SqlSession sqlSession = TransactionUtil.getSqlSession();
        MarketStatMapper marketStatMapper=sqlSession.getMapper(MarketStatMapper.class);
        return marketStatMapper.statGoods();
    }
}
